home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Skunkware 5
/
Skunkware 5.iso
/
src
/
X11
/
wais
/
bin
/
server_stats
< prev
next >
Wrap
Text File
|
1995-05-09
|
934b
|
39 lines
#!/bin/sh
# $Header: /tmp_mnt/net/quake/proj/wais/wais-8-b5/bin/RCS/server_stats,v 1.8 92/03/15 11:31:41 jonathan Exp $
# $Log: server_stats,v $
# Revision 1.8 92/03/15 11:31:41 jonathan
# Added line for warnings.
#
# Revision 1.7 92/03/11 08:38:30 jonathan
# Removed "error" from grep line. Added RCS headers.
#
#
# this is a simple script for generating statistics on the log
# the argument to this script is the name of the server log file.
if (test $# -eq 0)
then
echo "usage: $0 <server-log-file>"
echo " Generates statistics on the use of the Server"
exit 1
fi
my_dir=`dirname $0`
my_name=`basename $0`
if (test $my_dir -eq ""); then
for dir in $PATH; do
if [ -f $dir/$my_name ]; then
my_dir=$dir
fi
done
fi
cat $* | $my_dir/trunc 80 | awk -f $my_dir/stats.awk
echo -n "Errors: "
grep ": -1:" $* | wc -l | awk '{ print $1 }'
echo -n "Warnings: "
grep ": -2:" $* | wc -l | awk '{ print $1 }'